Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev bqx #25

Merged
merged 2 commits into from
Apr 7, 2024
Merged
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
23 changes: 6 additions & 17 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
export default {
"packages/competition/**/*.{js,cjs,ts,json,css,scss,tsx,sass}": () => [
"pnpm --filter @sast/oj-competition lint",
"pnpm --filter @sast/oj-competition build",
"git add ."
],
"packages/docs/**/*.{js,cjs,ts,html,json,css,scss,tsx,sass,md,mdx}": () => [
"pnpm --filter @sast/oj-docs build",
"git add ."
],
"packages/ui/**/*.{js,cjs,ts,html,json,css,scss,tsx,sass}": () => [
"pnpm --filter @sast/oj-ui test",
"pnpm --filter @sast/oj-ui format",
"pnpm --filter @sast/oj-ui lint",
"git add ."
],
// "*.*": () => "pnpm cz"
}
"packages/competition/**/*.{js,cjs,ts,json,css,scss,tsx,sass}": () => [
"pnpm --filter @sast/oj-competition lint",
"pnpm --filter @sast/oj-competition build",
"git add .",
],
};
10 changes: 1 addition & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"prepare": "husky install",
"ui:dev": "pnpm --filter @sast/oj-ui dev",
"ui:start": "pnpm --filter @sast/oj-ui dev:lib",
"ui:build": "pnpm --filter @sast/oj-ui build:lib",
"ui:lint": "pnpm --filter @sast/oj-ui lint",
"ui:format": "pnpm --filter @sast/oj-ui format",
"ui:test": "pnpm --filter @sast/oj-ui test",
"ui-uni:dev": "pnpm --filter @sast/oj-ui-universal dev",
"ui-uni:build": "pnpm --filter @sast/oj-ui-universal build",
"competition:dev": "pnpm --filter @sast/oj-competition dev",
"competition:build": "pnpm --filter @sast/oj-competition build:lib",
"competition:lint": "pnpm --filter @sast/oj-competition lint",
Expand Down Expand Up @@ -50,4 +42,4 @@
"typescript": "^5.3.3",
"vite-plugin-stylex": "^0.4.0"
}
}
}
3 changes: 1 addition & 2 deletions packages/competition/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"ionic:serve": "npm run dev"
},
"dependencies": {
"@sast/oj-ui": "workspace:^",
"@sast/oj-ui-universal": "workspace:^",
"@ui-aurora/react": "^0.0.1",
"axios": "^1.6.7",
"localforage": "^1.10.0",
"react": "^18.2.0",
Expand Down
70 changes: 32 additions & 38 deletions packages/competition/src/components/login/loginCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,47 +1,41 @@
import { Button, Card } from "@sast/oj-ui";
import { Button, Card } from "@ui-aurora/react";
import Logo from "../../logo";
import styles from "./index.module.scss";
import LoginCardContent from "./loginCardContent";

const LoginCard = () => {
return (
<>
<Card
className={styles.card}
size="small"
header={
<>
<div className={styles["header-container"]}>
<Logo width={300}></Logo>
<span>LOGIN HERE</span>
</div>
</>
}
mainContent={<LoginCardContent />}
footer={
<>
<div className={styles["footer-container"]}>
<div className={styles["divider-container"]}>
<div />
<span>Or continue with</span>
<div />
</div>
<div className={styles["other-way-container"]}>
<Button color="border">
<span>Link</span>
</Button>
<Button color="border">
<span>Link</span>
</Button>
<Button color="border">
<span>Link</span>
</Button>
</div>
</div>
</>
}
></Card>
</>
<Card
className={styles.card}
size="small"
header={
<div className={styles["header-container"]}>
<Logo width={300}></Logo>
<span>LOGIN HERE</span>
</div>
}
mainContent={<LoginCardContent />}
footer={
<div className={styles["footer-container"]}>
<div className={styles["divider-container"]}>
<div />
<span>Or continue with</span>
<div />
</div>
<div className={styles["other-way-container"]}>
<Button color="border">
<span>Link</span>
</Button>
<Button color="border">
<span>Link</span>
</Button>
<Button color="border">
<span>Link</span>
</Button>
</div>
</div>
}
></Card>
);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
import styles from "./icon.module.scss";
const Error = () => {
return (
<>
<svg
xmlns="http://www.w3.org/2000/svg"
width="25"
height="25"
viewBox="0 0 24 24"
className={styles.icon}
>
<line
className={styles.cross1}
x1="5"
y1="5"
x2="19"
y2="19"
stroke="white"
strokeWidth="4"
strokeLinecap="round"
/>
<line
className={styles.cross2}
x1="19"
y1="5"
x2="5"
y2="19"
stroke="white"
strokeWidth="4"
strokeLinecap="round"
/>
</svg>
</>
<svg
xmlns="http://www.w3.org/2000/svg"
width="25"
height="25"
viewBox="0 0 24 24"
className={styles.icon}
>
<line
className={styles.cross1}
x1="5"
y1="5"
x2="19"
y2="19"
stroke="white"
strokeWidth="4"
strokeLinecap="round"
/>
<line
className={styles.cross2}
x1="19"
y1="5"
x2="5"
y2="19"
stroke="white"
strokeWidth="4"
strokeLinecap="round"
/>
</svg>
);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Input, Button, showToast } from "@sast/oj-ui";
import { Input, Button, showToast } from "@ui-aurora/react";
import styles from "./index.module.scss";
import { useState } from "react";
import Success from "./icon/success";
Expand Down
18 changes: 8 additions & 10 deletions packages/competition/src/components/logo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ interface LogoProps {

const Logo = ({ width, height, className, style }: LogoProps) => {
return (
<>
<img
src={logo}
alt="logo"
width={width}
height={height}
className={className}
style={{ objectFit: "contain", ...style }}
></img>
</>
<img
src={logo}
alt="logo"
width={width}
height={height}
className={className}
style={{ objectFit: "contain", ...style }}
></img>
);
};

Expand Down
2 changes: 1 addition & 1 deletion packages/competition/src/pages/error/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styles from "./page.module.scss";
import error404 from "../../assets/404.png";
import { Button } from "@sast/oj-ui";
import { Button } from "@ui-aurora/react";
import { useNavigate } from "react-router-dom";
const Error = () => {
const navigate = useNavigate();
Expand Down
25 changes: 4 additions & 21 deletions packages/competition/src/pages/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
import LoginCard from "../../components/login/loginCard";
import styles from "./page.module.scss";
import { Button } from "@sast/oj-ui-universal";

const Login = () => {
return (
<>
<div className={styles["login-background"]}>
<div className={styles["login-card-container"]}>
<LoginCard></LoginCard>
<Button
_onclick={() => {
console.log("click");
}}
>
Click me
</Button>
<button
onClick={() => {
console.log("click");
}}
>
click
</button>
</div>
<div className={styles["login-background"]}>
<div className={styles["login-card-container"]}>
<LoginCard></LoginCard>
</div>
</>
</div>
);
};

Expand Down
24 changes: 0 additions & 24 deletions packages/ui-universal/.gitignore

This file was deleted.

16 changes: 0 additions & 16 deletions packages/ui-universal/index.html

This file was deleted.

Loading
Loading