Skip to content

Commit

Permalink
Update master (#1064)
Browse files Browse the repository at this point in the history
* Hide a slide outline

* fix news modal from closing when image is not created (#1061)

* - getting news from cache - green notification on news modal success (#1063)
  • Loading branch information
Adeodonne authored Dec 13, 2023
1 parent 0e2c36c commit 9c37f01
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/features/AdminPage/NewsPage/NewsModal/NewsModal.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,26 +72,17 @@ const NewsModal: React.FC<{
useEffect(() => {
setWaitingForApiResponse(false);
if (actionSuccess) {
message.info('Новину успішно додано/оновлено!', 2);
message.success('Новину успішно додано/оновлено!', 2);
setActionSuccess(false);
}
}, [actionSuccess]);
const handlePreview = async (file: UploadFile) => {
setFilePreview(file);
setPreviewOpen(true);
};
const getNewsList = async () => {
try {
const response = await axios.get('/news/getAll');
return response.data;
} catch (error) {
console.error('Помилка при отриманні списку новин', error);
return [];
}
};

const checkUniqueURL = async (url: string): Promise<boolean> => {
const newsList = await getNewsList();
const newsList = newsStore.getNewsArray;
if (newsItem) {
const filteredNewsList = newsList.filter((news: News) => news.id !== newsItem.id);
return filteredNewsList.every((news: News) => news.url !== url);
Expand Down
4 changes: 4 additions & 0 deletions src/features/SlickSlider/SlickSlider.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ li.slick-active button:before {
display: flex !important;
position: relative;
flex-direction: column;
&:focus,
&:focus-visible {
outline: none;
}

.left {
position: absolute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ $articlesImg: "@assets/images/sources/Articles.webp";
gap: 10px;
@include mut.flex-centered();
@include mut.bg-image($articlesImg);
&:focus,
&:focus-visible {
outline: none;
}

h1 {
color: white;
Expand Down
6 changes: 6 additions & 0 deletions src/features/StreetcodePage/SourcesBlock/Sources.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
.slick-track {
@include mut.flex-centered($gap: 30px);
width: unset !important;
border: none;
border: 1px solid transparent;
.slick-slide {
@include vnd.vendored(transition, 'all .5s ease');
.left, .right{
Expand All @@ -56,6 +58,10 @@
scale: 101%;
filter: contrast(135%);
cursor: pointer;
&:focus,
&:focus-visible {
outline: none;
}
}
}
.slick-cloned{
Expand Down

0 comments on commit 9c37f01

Please sign in to comment.