-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from EsefexBot/fix-eslint-errors
Fix EsLint errors and formatting
- Loading branch information
Showing
11 changed files
with
86 additions
and
71 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.serverName { | ||
text-align: right; | ||
} | ||
text-align: right; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
import { Button, Group, Image, Title } from "@mantine/core"; | ||
import { FC } from "react"; | ||
import "./Header.css"; | ||
import { Group, Image, Title } from '@mantine/core'; | ||
import './Header.css'; | ||
|
||
export const Header: FC = () => { | ||
return ( | ||
<> | ||
<Group grow> | ||
<div> | ||
<Image w={100} h={100} src="https://cdn.discordapp.com/attachments/248446166927147009/1177018089712402432/esefex.png?ex=658caa04&is=657a3504&hm=236dd01dab7c2356c82afccf9fab8a1bbd823774080c230565cec71fb5f62773&" /> | ||
</div> | ||
<Title className="serverName" mr={20} >Server Name</Title> | ||
</Group> | ||
</> | ||
); | ||
} | ||
// dont use a react-fragment if only one element is wrapped --> unneccesairy code | ||
function Header() { | ||
return ( | ||
<Group grow> | ||
<div> | ||
<Image | ||
w={100} | ||
h={100} | ||
src="https://cdn.discordapp.com/attachments/248446166927147009/1177018089712402432/esefex.png?ex=658caa04&is=657a3504&hm=236dd01dab7c2356c82afccf9fab8a1bbd823774080c230565cec71fb5f62773&" | ||
/> | ||
</div> | ||
<Title className="serverName" mr={20}> | ||
Server Name | ||
</Title> | ||
</Group> | ||
); | ||
} | ||
|
||
export default Header; |
27 changes: 16 additions & 11 deletions
27
EsefexUI/src/renderer/components/soundButton/SoundButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
import { Button } from "@mantine/core"; | ||
import { FC } from "react"; | ||
import { Sound } from "../../models/Sound"; | ||
import { Button } from '@mantine/core'; | ||
import { Sound } from '../../models'; | ||
|
||
interface SoundButtonProps { | ||
sound: Sound; | ||
sound: Sound; | ||
} | ||
|
||
export const SoundButton: FC<SoundButtonProps> = ({sound}) => { | ||
return ( | ||
<> | ||
<Button w={100} h={100} bg="#1A1A1A" radius={25}><img src={sound.icon}/></Button> | ||
</> | ||
); | ||
} | ||
// always name the props "props", helps with collaberation, easier to identify | ||
|
||
function SoundButton(props: SoundButtonProps) { | ||
// destructure props if needed | ||
const { sound } = props; | ||
return ( | ||
<Button w={100} h={100}> | ||
<img src={sound.icon} alt="test" /> | ||
</Button> | ||
); | ||
} | ||
|
||
export default SoundButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
type Sound = { | ||
id: string; | ||
serverId: string; | ||
name: string; | ||
icon: string; | ||
}; | ||
// use interfaes not types | ||
|
||
export type { Sound }; | ||
export interface Sound { | ||
id: string; | ||
serverId: string; | ||
name: string; | ||
icon: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// use index.ts for exporting --> eliminates one import path and allows easier importing from the "models" module | ||
// always order this file alphabetically, as in the filetree | ||
export * from './Sound'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
module.exports = { | ||
plugins: { | ||
'postcss-preset-mantine': {}, | ||
'postcss-simple-vars': { | ||
variables: { | ||
'mantine-breakpoint-xs': '36em', | ||
'mantine-breakpoint-sm': '48em', | ||
'mantine-breakpoint-md': '62em', | ||
'mantine-breakpoint-lg': '75em', | ||
'mantine-breakpoint-xl': '88em', | ||
}, | ||
plugins: { | ||
'postcss-preset-mantine': {}, | ||
'postcss-simple-vars': { | ||
variables: { | ||
'mantine-breakpoint-xs': '36em', | ||
'mantine-breakpoint-sm': '48em', | ||
'mantine-breakpoint-md': '62em', | ||
'mantine-breakpoint-lg': '75em', | ||
'mantine-breakpoint-xl': '88em', | ||
}, | ||
}, | ||
}; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import { createTheme } from '@mantine/core'; | ||
|
||
export const theme = createTheme({ | ||
const Theme = createTheme({ | ||
/** Put your mantine theme override here */ | ||
}); | ||
}); | ||
|
||
export default Theme; |