Skip to content

Commit

Permalink
remove unused things and allowed card page to accessed
Browse files Browse the repository at this point in the history
  • Loading branch information
avanastar committed Nov 17, 2023
1 parent e277c9c commit 56ed453
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Components/LogoutButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface LogoutButtonProps {
props?: any;
}

export const LogoutButton = ({ action, ...props }: LogoutButtonProps) => {
export const LogoutButton = ({ action }: LogoutButtonProps) => {
const handleLogout = () => {
signOut(getAuth()).then(() => {
if (action) action();
Expand Down
13 changes: 7 additions & 6 deletions src/Components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React, { useEffect } from 'react';
import {
getAuth,
GoogleAuthProvider,
signInWithPopup,
signOut,
} from 'firebase/auth';
// Login with Google
// import {
// getAuth,
// GoogleAuthProvider,
// signInWithPopup,
// signOut,
// } from 'firebase/auth';
import { Link } from 'react-router-dom';
import { useAuthState } from '../../firebase/firebase';
import Burger from '../Burger';
Expand Down
10 changes: 10 additions & 0 deletions src/Components/Router/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Home from '../../Pages/Home';
import Discord from '../../Pages/Discord';
import NotFound from '../../Pages/NotFound';
import Unauthorized from '../../Pages/Unauthorized';
import Cards from '../../Pages/Cards';

const Routes = [
{
Expand Down Expand Up @@ -33,6 +34,15 @@ const Routes = [
reqAuthState: RequiredAuthState.LoggedOut,
hidden: true,
},
{
title: 'Cards',
description: 'Cards',
path: '/cards',
name: 'Cards',
component: Cards,
reqAuthState: RequiredAuthState.Any,
hidden: true,
},
{
title: 'AvaRose - 404',
description: 'Page Not Found',
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/Cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const Cards = () => {
Add Card
</button>
<div className='cards'>
{cardsList.map((card: Card, i) => (
{cardsList.map((card: Card) => (
<div className='card' id={`card-${card.id}`} key={card.id}>
<div className='card-border' />
<div className='card-content'>
Expand Down
4 changes: 2 additions & 2 deletions src/Pages/Discord/Discord.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { useEffect } from 'react';
import Loading from '@nextui-org/react/loading';
import ReactGA from 'react-ga4';
import './style.scss';
import { Container, Typography } from '@mui/material';
import { seo, SeoData } from '../../Helpers/seo';
import { Typography } from '@mui/material';
import { seo } from '../../Helpers/seo';

const url = 'https://discord.com/api/guilds/1006583002517745674/widget.json',
getDiscordData = async () => {
Expand Down

0 comments on commit 56ed453

Please sign in to comment.