Skip to content

Commit

Permalink
add codeClimat Badge
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatyana-js committed Feb 5, 2025
1 parent 8504760 commit e4ed963
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Чат Slack

[![Actions Status](https://github.com/Tatyana-js/frontend-project-12/actions/workflows/hexlet-check.yml/badge.svg)](https://github.com/Tatyana-js/frontend-project-12/actions)
[![Maintainability](https://api.codeclimate.com/v1/badges/482fed40b8cb3a5af80b/maintainability)](https://codeclimate.com/github/Tatyana-js/frontend-project-12/maintainability)

[ССылка на приложение](https://github.com/Tatyana-js/frontend-project-12)

Expand Down
10 changes: 7 additions & 3 deletions frontend/src/components/ChannelAddButtom.jsx.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Button } from 'react-bootstrap';
import { useTranslation } from 'react-i18next';

const ButtonPlus = ({ showModal, channel }) => (
const ButtonPlus = ({ showModal, channel }) => {
const { t } = useTranslation();
return (
<Button
type="button"
className="p-0 text-primary btn btn-group-vertical"
Expand All @@ -13,8 +16,9 @@ const ButtonPlus = ({ showModal, channel }) => (
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4">
</path>
</svg>
<span className="visually-hidden">+</span>
<span className="visually-hidden">{t('channels.buttonPlus')}</span>
</Button>
);
);
};

export default ButtonPlus;
1 change: 1 addition & 0 deletions frontend/src/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default {
create: 'Channel created',
rename: 'Channel renamed',
delete: 'Channel deleted',
buttonPlus: '+',
},
modal: {
name: 'Channel Name',
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/locales/ru.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { exists } from "i18next";

export default {
translation: {
loginForm: {
Expand All @@ -21,6 +19,7 @@ export default {
create: 'Канал создан',
rename: 'Канал переименован',
delete: 'Канал удалён',
buttonPlus: '+',
},
modal: {
name: 'Имя канала',
Expand Down
3 changes: 3 additions & 0 deletions frontend/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export default defineConfig({
if (id.includes('bootstrap' || 'index-BwV0OUVV.css')) {
return 'bootstrap';
}
if (id.includes('node_modules')) {
return 'vendor';
}
},
},
},
Expand Down

0 comments on commit e4ed963

Please sign in to comment.