Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/components/footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { makeStyles, Theme, Typography, useMediaQuery } from "@material-ui/core"
import Spacing from "@components/spacing"
import { Image } from "@components/image"
import { Grid } from "@material-ui/core"
import Box from "@mui/material/Box"
import Logo from "@components/logo"
import ScrollTop from "@components/scroll-top"

interface FooterItemsProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/ExcludeAccount.form.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { Grid, Typography, Button, FormControl, makeStyles, Theme } from '@material-ui/core'
import { Grid, Button, makeStyles, Theme } from '@material-ui/core'
import Spacing from '@components/spacing'
import { HeaderTitle } from '@components/header'

Expand Down
19 changes: 1 addition & 18 deletions src/components/forms/PersonalData.form.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React, { useState, useContext } from 'react'
import { Grid, Typography, TextField, InputAdornment, makeStyles, Theme } from '@material-ui/core'
import { Grid, InputAdornment } from '@material-ui/core'


//Internal
import User, { UserProps } from '@services/user'
import Spacing from '@components/spacing'
import LoadingButton from '@components/loading-button'
import { SnackbarContext } from '@components/snackbar/HacktoberfestSnackbar'
import { HacktoberfestTextInput } from '@components/text-input'
Expand All @@ -26,23 +25,7 @@ const validationSchema = () => Yup.object().shape({
githubUser: Yup.string().required("Preenchimento do usuário Github obrigatório")
})

const useStyles = makeStyles((theme: Theme) => ({
fontCall: {
fontSize: "2.25rem",
[theme.breakpoints.up("lg")]: {
fontSize: "3.5rem",
}
},
subFontCall: {
fontSize: "1.125rem",
[theme.breakpoints.up("lg")]: {
fontSize: "1.5rem",
}
}
}))

const PersonalDataForm = (props: PersonalDataFormProps) => {
const classes = useStyles();
const { user, onSuccess, showOnlyEmailField = false } = props
const [isLoading, setIsLoading] = useState<boolean>(false)
const snackbarContext = useContext(SnackbarContext)
Expand Down
1 change: 0 additions & 1 deletion src/components/header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from "react"
import { Theme, useMediaQuery } from "@material-ui/core"
import { makeStyles } from "@material-ui/core/styles"
import Hidden from "@material-ui/core/Hidden"
import Navigation from "@components/navigation"

const useStyles = makeStyles((theme: Theme) => ({
Expand Down
34 changes: 0 additions & 34 deletions src/components/hero/Carousel.tsx

This file was deleted.

5 changes: 1 addition & 4 deletions src/components/hero/HeroCall.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import React, { useState, useEffect } from "react"
import React from "react"
import Spacing from "@components/spacing"
import { makeStyles, Theme } from "@material-ui/core/styles"
import { useMediaQuery, Grid, Box } from "@material-ui/core"

import SmartView from "./HeroSmart"
import DesktopView from "./HeroDesktop"
import { UserProps } from "@services/user"



const useStyles = makeStyles((theme: Theme) => ({
wrapper: {
height: "100%",
Expand Down
33 changes: 0 additions & 33 deletions src/components/logo/Logo.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/logo/index.ts

This file was deleted.

15 changes: 0 additions & 15 deletions src/components/navigation/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@ import {
Typography,
Slide,
Paper,
useMediaQuery,
} from "@material-ui/core"
import { makeStyles, Theme } from "@material-ui/core/styles"
import { NavigationItemProps, NavigationProps } from "./index"
import Logo from "@components/logo"
import NavigationItem from "./NavigationItem"
import User from "@services/user"
import { Image } from "@components/image"

import CloseIcon from "@material-ui/icons/Close"
import Spacing from "@components/spacing"
import { Height } from '@material-ui/icons'

interface NavigationItemsProps {
items: Array<NavigationItemProps>
Expand Down Expand Up @@ -105,9 +102,6 @@ const useStyles = makeStyles((theme: Theme) => ({

const NavigationItems = (props: NavigationItemsProps) => {
const [isLogged, setIsLogged] = useState<boolean>()
const isDesktop = useMediaQuery((theme: Theme) => {
return theme.breakpoints.up(theme.breakpoints.values.lg)
})

useEffect(() => {
const checkIfLogged = async () =>
Expand All @@ -118,11 +112,6 @@ const NavigationItems = (props: NavigationItemsProps) => {
const classes = useStyles()
return (
<ul className={classes.navigation}>
{isDesktop && (
<li style={{ marginLeft: 20 }}>
<Logo />
</li>
)}
{props.items.map((def: NavigationItemProps) => (
<NavigationItem key={def.label} {...def} />
))}
Expand All @@ -139,7 +128,6 @@ const HomeCall = () => (
)

const DeskMenu = () => {
const classes = useStyles()
return (
<Grid
container
Expand Down Expand Up @@ -214,9 +202,6 @@ const SmartMenu = () => {
justifyContent="space-between"
alignItems="center"
>
<Grid item xs={6} md={3} lg={1}>
<Logo />
</Grid>
<Grid item xs={2} md={1}>
<Button
style={{
Expand Down
1 change: 0 additions & 1 deletion src/components/navigation/NavigationItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { makeStyles, Theme } from "@material-ui/core/styles"
interface NavigationItemProps {
label: string
link: string
diferentColor: string
}

const useStyles = makeStyles((theme: Theme) => ({
Expand Down
3 changes: 0 additions & 3 deletions src/components/participations/Participations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import { makeStyles, Theme } from '@material-ui/core/styles'
import EmojiEventIcon from '@material-ui/icons/EmojiEvents'
import { HeaderTitle } from "@components/header"




const useStyles = makeStyles((theme: Theme) => ({
root: {
flexDirection: 'row',
Expand Down
4 changes: 2 additions & 2 deletions src/components/projects/ProjectsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function ProjectsListError() {

function ProjectTableRow(props: ProjectProps) {
const classes = useStyles()
const { name, description, repo, imageUrl, stats = {}, isHome } = props
const { name, description, repo, stats = {} } = props
function accessProjectRepo() {
window.open(repo, "_blank", "noopener,noreferrer")
}
Expand Down Expand Up @@ -288,7 +288,7 @@ function ProjectTableRow(props: ProjectProps) {
}
function ProjectCard(props: ProjectProps) {
const classes = useStyles()
const { name, description, repo, imageUrl, stats = {}, isHome } = props
const { name, description, repo, stats = {}, isHome } = props
function accessProjectRepo() {
window.open(repo, "_blank", "noopener,noreferrer")
}
Expand Down
19 changes: 1 addition & 18 deletions src/components/repo-languages/RepoLanguages.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from "react"
import { colorLanguage } from "./color-language"
import { makeStyles, Typography } from "@material-ui/core"
import { makeStyles } from "@material-ui/core"
import { Image } from "@components/image"


Expand Down Expand Up @@ -35,22 +34,6 @@ interface RepoLanguagesProps {
languages: string[]
}

interface CircleLanguageProps {
language: string
}

const CircleLanguage = (props: CircleLanguageProps) => {
const classes = useStyles()
return (
<div
className={classes.repoLanguageColor}
style={{ backgroundColor: colorLanguage[`${props.language.name}`] }}
>
{props.language.name}
</div>
)
}

const LANGUAGES:object = {
"go": "2023/go.svg",
"php": "2023/php.svg",
Expand Down
3 changes: 1 addition & 2 deletions src/components/rules/Rules.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from "react"
import Spacing from "@components/spacing"
import { Image } from "@components/image"
import { makeStyles, Theme, useTheme } from "@material-ui/core/styles"
import { makeStyles, Theme } from "@material-ui/core/styles"
import { useMediaQuery, Grid, Button, Typography, Box } from "@material-ui/core"
import InfoSharpIcon from "@material-ui/icons/InfoSharp"

import { UserProps } from "@services/user"

Expand Down
2 changes: 0 additions & 2 deletions src/components/scroll-top/ScrollTop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const useStyles = makeStyles(() => ({
},
}))


const ScrollTop = () => {
const classes = useStyles()

Expand All @@ -33,5 +32,4 @@ const ScrollTop = () => {
)
}


export default ScrollTop
5 changes: 1 addition & 4 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Spacing from "@components/spacing"
import HeroCall from "@components/hero"
import Rules from "@components/rules"
import { makeStyles, Theme } from "@material-ui/core/styles"
import { Link, Grid, Typography, useMediaQuery } from "@material-ui/core"
import { Link, Grid, Typography } from "@material-ui/core"
import Button from "@material-ui/core/Button"
import ProjectsList from "@components/projects"
import User, { UserProps } from "@services/user"
Expand Down Expand Up @@ -161,9 +161,6 @@ const IndexPage = () => {
}, [])

const classes = useStyles()
const isDesktop = useMediaQuery((theme: Theme) => {
return theme.breakpoints.up(theme.breakpoints.values.lg)
})

return (
<Layout title="Globo Hacktoberfest">
Expand Down
19 changes: 1 addition & 18 deletions src/pages/minha-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Layout from "@components/layout"
import Hacktoberfest from "@services/hacktoberfest"
import User, { UserProps } from "@services/user"
import { ExcludeAccountForm, PersonalDataForm } from "@components/forms"
import MuiAlert, { AlertProps, Color } from "@material-ui/lab/Alert"
import { ParticipationHistory } from "@components/participations"
import Spacing from '@components/spacing'

Expand All @@ -34,26 +33,10 @@ const useStyles = makeStyles((theme: Theme) => ({
}
}))

interface HacktoberFestAlertProps extends AlertProps {
message?: string
}

const Alert = (props: HacktoberFestAlertProps) => (
<MuiAlert elevation={6} variant="filled" {...props}>
{" "}
{props.message}{" "}
</MuiAlert>
)

const PersonalAreaPage = () => {
const [alert, setAlert] = useState<HacktoberFestAlertProps>()
const [loaded, setIsLoaded] = useState<boolean>(false)
const [user, setUser] = useState<UserProps>()
const [currentEdition, setCurrentEdition] = useState<number>(0)

const closeSnackbar = () => setAlert(undefined)
const showSnackBar = (severity: Color, message: string) =>
setAlert({ severity, message })
const [_, setCurrentEdition] = useState<number>(0)

useEffect(() => {
const fetchUser = async () => {
Expand Down
Loading