Skip to content

Commit

Permalink
feat: add Auth0 configuration and remove obsolete code
Browse files Browse the repository at this point in the history
  • Loading branch information
amalv committed Dec 26, 2023
1 parent 8be3e5f commit 4c85438
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
run: npm run build
env:
VITE_API_URL_PRODUCTION: ${{ secrets.VITE_API_URL_PRODUCTION }}
VITE_AUTH0_DOMAIN: ${{ secrets.VITE_AUTH0_DOMAIN }}
VITE_AUTH0_CLIENT_ID: ${{ secrets.VITE_AUTH0_CLIENT_ID }}
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
Expand Down
9 changes: 3 additions & 6 deletions src/components/BookList/BookList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export const BookList = () => {
const [search, setSearch] = useState("");
const [debouncedSearch, setDebouncedSearch] = useState("");
const { user } = useAuth0();
const showLogin = import.meta.env.VITE_SHOW_LOGIN === "true";

useEffect(() => {
if (user) {
Expand All @@ -67,11 +66,9 @@ export const BookList = () => {
<Grid container>
<Grid item xs={1} sm={1} md={2} />
<Grid item xs={10} sm={10} md={8}>
{showLogin && (
<Box display="flex" justifyContent="flex-end" mt={2}>
<LoginButton />
</Box>
)}
<Box display="flex" justifyContent="flex-end" mt={2}>
<LoginButton />
</Box>
<SearchInput search={search} setSearch={setSearch} />
<Books search={debouncedSearch} limit={50} />
</Grid>
Expand Down

0 comments on commit 4c85438

Please sign in to comment.