mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-19 11:12:00 +10:00
- run eslint --fix across project
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
import { navigate } from "gatsby";
|
||||
import { useEffect } from "react";
|
||||
import { navigate } from 'gatsby';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
const NotFound = () => {
|
||||
useEffect(() => {
|
||||
navigate("/");
|
||||
navigate('/');
|
||||
}, []);
|
||||
|
||||
return null;
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { Redirect, Router } from "@reach/router";
|
||||
import React from "react";
|
||||
import PrivateRoute from "../components/router/PrivateRoute";
|
||||
import Wrapper from "../components/shared/Wrapper";
|
||||
import NotFound from "./404";
|
||||
import Builder from "./app/builder";
|
||||
import Dashboard from "./app/dashboard";
|
||||
import { Redirect, Router } from '@reach/router';
|
||||
import React from 'react';
|
||||
import PrivateRoute from '../components/router/PrivateRoute';
|
||||
import Wrapper from '../components/shared/Wrapper';
|
||||
import NotFound from './404';
|
||||
import Builder from './app/builder';
|
||||
import Dashboard from './app/dashboard';
|
||||
|
||||
const App = () => (
|
||||
<Wrapper>
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import { navigate } from "gatsby";
|
||||
import React, { useContext, useEffect, useMemo, useState } from "react";
|
||||
import { toast } from "react-toastify";
|
||||
import Artboard from "../../components/builder/center/Artboard";
|
||||
import LeftSidebar from "../../components/builder/left/LeftSidebar";
|
||||
import RightSidebar from "../../components/builder/right/RightSidebar";
|
||||
import LoadingScreen from "../../components/router/LoadingScreen";
|
||||
import DatabaseContext from "../../contexts/DatabaseContext";
|
||||
import { useDispatch } from "../../contexts/ResumeContext";
|
||||
import { navigate } from 'gatsby';
|
||||
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
||||
import { toast } from 'react-toastify';
|
||||
import Artboard from '../../components/builder/center/Artboard';
|
||||
import LeftSidebar from '../../components/builder/left/LeftSidebar';
|
||||
import RightSidebar from '../../components/builder/right/RightSidebar';
|
||||
import LoadingScreen from '../../components/router/LoadingScreen';
|
||||
import DatabaseContext from '../../contexts/DatabaseContext';
|
||||
import { useDispatch } from '../../contexts/ResumeContext';
|
||||
|
||||
const Builder = ({ id }) => {
|
||||
const dispatch = useDispatch();
|
||||
@ -18,17 +18,16 @@ const Builder = ({ id }) => {
|
||||
const resume = await getResume(id);
|
||||
|
||||
if (!resume) {
|
||||
navigate("/app/dashboard");
|
||||
navigate('/app/dashboard');
|
||||
toast.error(
|
||||
`The resume you were looking for does not exist anymore... or maybe it never did?`
|
||||
`The resume you were looking for does not exist anymore... or maybe it never did?`,
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
dispatch({ type: "set_data", payload: resume });
|
||||
setLoading(false);
|
||||
dispatch({ type: 'set_data', payload: resume });
|
||||
return setLoading(false);
|
||||
})();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [id]);
|
||||
|
||||
return useMemo(() => {
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import firebase from "gatsby-plugin-firebase";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Helmet } from "react-helmet";
|
||||
import CreateResume from "../../components/dashboard/CreateResume";
|
||||
import ResumePreview from "../../components/dashboard/ResumePreview";
|
||||
import TopNavbar from "../../components/dashboard/TopNavbar";
|
||||
import LoadingScreen from "../../components/router/LoadingScreen";
|
||||
import firebase from 'gatsby-plugin-firebase';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import CreateResume from '../../components/dashboard/CreateResume';
|
||||
import ResumePreview from '../../components/dashboard/ResumePreview';
|
||||
import TopNavbar from '../../components/dashboard/TopNavbar';
|
||||
import LoadingScreen from '../../components/router/LoadingScreen';
|
||||
|
||||
const Dashboard = ({ user }) => {
|
||||
const [resumes, setResumes] = useState([]);
|
||||
@ -16,12 +16,12 @@ const Dashboard = ({ user }) => {
|
||||
firebase
|
||||
.database()
|
||||
.ref(ref)
|
||||
.on("value", (snapshot) => {
|
||||
.on('value', (snapshot) => {
|
||||
if (snapshot.val()) {
|
||||
const resumes = [];
|
||||
const resumesArr = [];
|
||||
const data = snapshot.val();
|
||||
Object.keys(data).forEach((key) => resumes.push(data[key]));
|
||||
setResumes(resumes);
|
||||
Object.keys(data).forEach((key) => resumesArr.push(data[key]));
|
||||
setResumes(resumesArr);
|
||||
}
|
||||
|
||||
setLoading(false);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import { Helmet } from "react-helmet";
|
||||
import Hero from "../components/landing/Hero";
|
||||
import Wrapper from "../components/shared/Wrapper";
|
||||
import React from 'react';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import Hero from '../components/landing/Hero';
|
||||
import Wrapper from '../components/shared/Wrapper';
|
||||
|
||||
const Home = () => {
|
||||
return (
|
||||
@ -32,11 +32,11 @@ const Home = () => {
|
||||
</Feature>
|
||||
|
||||
<Feature title="Kickstarting your career shouldn’t come at a cost.">
|
||||
There are brilliant alternatives to this app like{" "}
|
||||
There are brilliant alternatives to this app like{' '}
|
||||
<a href="/" target="blank">
|
||||
Novoresume
|
||||
</a>{" "}
|
||||
and{" "}
|
||||
</a>{' '}
|
||||
and{' '}
|
||||
<a href="/" target="blank">
|
||||
Zety
|
||||
</a>
|
||||
@ -50,7 +50,7 @@ const Home = () => {
|
||||
|
||||
<footer className="my-24">
|
||||
<p className="font-medium text-gray-500">
|
||||
Licensed under <a href="/">MIT</a> | Made with love by{" "}
|
||||
Licensed under <a href="/">MIT</a> | Made with love by{' '}
|
||||
<a href="https://www.amruthpillai.com/">Amruth Pillai</a>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user