Skip to content

Commit

Permalink
Alert
Browse files Browse the repository at this point in the history
  • Loading branch information
thangved committed Jun 17, 2023
1 parent 099efb6 commit 08caf91
Show file tree
Hide file tree
Showing 44 changed files with 390 additions and 388 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
title: ''
labels: ''
assignees: ''
---

**Describe the bug**
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
title: ''
labels: ''
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
Expand Down
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "weekly"
interval: 'weekly'
12 changes: 6 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
branches: ['main']
schedule:
- cron: "40 22 * * 4"
- cron: '40 22 * * 4'

jobs:
analyze:
Expand All @@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: ["javascript"]
language: ['javascript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

Expand Down Expand Up @@ -70,4 +70,4 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
category: '/language:${{matrix.language}}'
6 changes: 3 additions & 3 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Dependency Review"
name: 'Dependency Review'
on: [pull_request]

permissions:
Expand All @@ -8,7 +8,7 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: "Dependency Review"
- name: 'Dependency Review'
uses: actions/dependency-review-action@v2
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Docker Image CI

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
branches: ["main"]
branches: ['main']

jobs:
build:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ name: Docker

on:
schedule:
- cron: "33 19 * * *"
- cron: '33 19 * * *'
push:
branches: ["main"]
branches: ['main']
# Publish semver tags as releases.
tags: ["v*.*.*"]
tags: ['v*.*.*']
pull_request:
branches: ["main"]
branches: ['main']

env:
# Use docker.io for Docker Hub if empty
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0
with:
cosign-release: "v1.11.0"
cosign-release: 'v1.11.0'

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
"on":
'on':
push:
branches:
- main
Expand All @@ -14,7 +14,7 @@ jobs:
- run: yarn && yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_W5TOOLS }}"
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_W5TOOLS }}'
channelId: live
projectId: w5tools
8 changes: 4 additions & 4 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
"on": pull_request
'on': pull_request
jobs:
build_and_preview:
if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}"
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn && yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_W5TOOLS }}"
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_W5TOOLS }}'
projectId: w5tools
30 changes: 15 additions & 15 deletions .github/workflows/github-pages-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: Build and Deploy
on: [push]
permissions:
contents: write
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: |
yarn
yarn build
- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: |
yarn
yarn build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build # The folder the action should deploy.
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build # The folder the action should deploy.
6 changes: 3 additions & 3 deletions .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ name: Hadolint

on:
push:
branches: ["main"]
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
branches: ['main']
schedule:
- cron: "26 4 * * 1"
- cron: '26 4 * * 1'

permissions:
contents: read
Expand Down
4 changes: 2 additions & 2 deletions craco.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const path = require("path");
const path = require('path');

module.exports = {
webpack: {
alias: {
"~": path.resolve(__dirname, "./src"),
'~': path.resolve(__dirname, './src'),
},
},
};
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.7"
version: '3.7'

services:
w5-tools:
Expand All @@ -7,7 +7,7 @@ services:
- app:/app
working_dir: /app
ports:
- "3000:3000"
- '3000:3000'

volumes:
app:
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject",
"format": "npm prettier --write . --single-quote=true --use-tabs=true --tab-width=4",
"format": "prettier --write . --single-quote=true --use-tabs=true --tab-width=4",
"prepare": "husky install"
},
"eslintConfig": {
Expand Down
38 changes: 19 additions & 19 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
import { Layout, Spin, Typography, App as AntdApp } from "antd";
import { Content, Footer, Header } from "antd/lib/layout/layout";
import { lazy, Suspense } from "react";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import { Layout, Spin, Typography, App as AntdApp } from 'antd';
import { Content, Footer, Header } from 'antd/lib/layout/layout';
import { lazy, Suspense } from 'react';
import { BrowserRouter, Route, Routes } from 'react-router-dom';

import "./App.css";
import styles from "./App.module.scss";
import Navbar from "~/components/Navbar";
import Changelog from "~/pages/Changelog";
import Home from "~/pages/Home/Home";
import './App.css';
import styles from './App.module.scss';
import Navbar from '~/components/Navbar';
import Changelog from '~/pages/Changelog';
import Home from '~/pages/Home/Home';

const Grade = lazy(() => import("~/pages/Grade"));
const TimeTable = lazy(() => import("~/pages/TimeTable"));
const Grade = lazy(() => import('~/pages/Grade'));
const TimeTable = lazy(() => import('~/pages/TimeTable'));

function App() {
return (
<AntdApp>
<BrowserRouter>
<Layout
style={{
minHeight: "100vh",
display: "flex",
flexDirection: "row"
minHeight: '100vh',
display: 'flex',
flexDirection: 'row',
}}
>
<Navbar />
<Layout style={{ flex: 1, overflow: "hidden" }}>
<Layout style={{ flex: 1, overflow: 'hidden' }}>
<Header />
<Content style={{ overflow: "hidden" }}>
<Content style={{ overflow: 'hidden' }}>
<Suspense
fallback={
<div className={styles.fallback}>
Expand All @@ -48,7 +48,7 @@ function App() {
</Routes>
</Suspense>
</Content>
<Layout style={{ width: "100%" }}>
<Layout style={{ width: '100%' }}>
<Footer>
<Typography.Text>
&copy; {new Date().getFullYear()} W5 TEAM.
Expand All @@ -57,14 +57,14 @@ function App() {
</Typography.Text>

<Typography.Text>
Dev by{" "}
Dev by{' '}
<a
target="_blank"
rel="noreferrer"
href="https://fb.com/thangved"
>
Minh Thang
</a>{" "}
</a>{' '}
(thangved)
<br />
</Typography.Text>
Expand Down
6 changes: 3 additions & 3 deletions src/App.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from "@testing-library/react";
import App from "./App";
import { render, screen } from '@testing-library/react';
import App from './App';

test("renders learn react link", () => {
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
Expand Down
30 changes: 15 additions & 15 deletions src/components/Navbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import {
HistoryOutlined,
TableOutlined,
ToolOutlined,
} from "@ant-design/icons/lib/icons";
import { Menu } from "antd";
import Sider from "antd/lib/layout/Sider";
import { useState } from "react";
import { Link, useLocation, useNavigate } from "react-router-dom";
} from '@ant-design/icons/lib/icons';
import { Menu } from 'antd';
import Sider from 'antd/lib/layout/Sider';
import { useState } from 'react';
import { Link, useLocation, useNavigate } from 'react-router-dom';

import styles from "./Navbar.module.scss";
import styles from './Navbar.module.scss';

const Navbar = () => {
const [collapsed, setCollapsed] = useState(true);
Expand All @@ -29,26 +29,26 @@ const Navbar = () => {
mode="inline"
>
<Menu.Item
key={"/grade"}
key={'/grade'}
icon={<ToolOutlined />}
onClick={() => navigate("/grade")}
onClick={() => navigate('/grade')}
>
{!collapsed && "Tính điểm"}
{!collapsed && 'Tính điểm'}
</Menu.Item>
<Menu.Item
key={"/timetable"}
key={'/timetable'}
icon={<TableOutlined />}
onClick={() => navigate("/timetable")}
onClick={() => navigate('/timetable')}
>
{!collapsed && "Thời khóa biểu"}
{!collapsed && 'Thời khóa biểu'}
</Menu.Item>

<Menu.Item
key={"/changelog"}
key={'/changelog'}
icon={<HistoryOutlined />}
onClick={() => navigate("/changelog")}
onClick={() => navigate('/changelog')}
>
{!collapsed && "Nhập ký thay đổi"}
{!collapsed && 'Nhập ký thay đổi'}
</Menu.Item>
</Menu>
</Sider>
Expand Down

1 comment on commit 08caf91

@vercel
Copy link

@vercel vercel bot commented on 08caf91 Jun 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks for Deployment have failed

Please sign in to comment.