Skip to content

Commit

Permalink
Merge pull request #7 from artyom-88/develop
Browse files Browse the repository at this point in the history
Update from develop
  • Loading branch information
artyom-88 authored Dec 27, 2023
2 parents 52bf3fc + 4c1ccb6 commit 0ac6661
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "CodeQL"
on:
push:
branches: [ "develop", "main" ]
pull_request:
branches: [ "develop", "main" ]
jobs:
analyze:
name: Analyze
runs-on: ${{ 'ubuntu-latest' }}
timeout-minutes: ${{ 360 }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript-typescript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
10 changes: 8 additions & 2 deletions src/pages/career.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import { useCallback } from 'react';

import { Button } from '@nextui-org/react';

import { useAuthorized } from '@/features/auth/hooks/use-authorized';
import CareerList from '@/features/career/CareerList';
import CareerModal from '@/features/career/CareerModal';
import { useCareerListQuery } from '@/features/career/hooks/use-career-list-query';
import { useCareerModal } from '@/features/career/hooks/use-career-modal';

const Careers = (): JSX.Element => {
const isAuthorized = useAuthorized();
const { refetch } = useCareerListQuery({ enabled: true });
const { handleOpen } = useCareerModal();
const handleAdd = useCallback(() => handleOpen(), [handleOpen]);
Expand All @@ -18,8 +20,12 @@ const Careers = (): JSX.Element => {
<div className='flex justify-between'>
<h1>Career</h1>
<div className='flex'>
<Button onClick={handleAdd}>Add</Button>
<span>&nbsp;</span>
{isAuthorized ? (
<>
<Button onClick={handleAdd}>Add</Button>
<span>&nbsp;</span>
</>
) : null}
<Button onClick={handleRefresh}>Refresh</Button>
</div>
</div>
Expand Down

0 comments on commit 0ac6661

Please sign in to comment.