Revert "✨(frontend) add document visible in list and openable via enter key"
This reverts commit b619850b1420421f09f56aa8644a93e0fa698682.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { Tooltip, useModal } from '@openfun/cunningham-react';
|
||||
import { DateTime } from 'luxon';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { css } from 'styled-components';
|
||||
|
||||
@@ -22,7 +21,6 @@ type DocsGridItemProps = {
|
||||
|
||||
export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
|
||||
const { t } = useTranslation();
|
||||
const router = useRouter();
|
||||
const { isDesktop } = useResponsiveStore();
|
||||
const { flexLeft, flexRight } = useResponsiveDocGrid();
|
||||
const { spacingsTokens } = useCunninghamTheme();
|
||||
@@ -35,13 +33,6 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
|
||||
shareModal.open();
|
||||
};
|
||||
|
||||
const handleKeyDown = (e: React.KeyboardEvent) => {
|
||||
if (e.key === 'Enter' || e.key === ' ') {
|
||||
e.preventDefault();
|
||||
void router.push(`/docs/${doc.id}`);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Box
|
||||
@@ -61,10 +52,6 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
|
||||
}
|
||||
`}
|
||||
className="--docs--doc-grid-item"
|
||||
onKeyDown={handleKeyDown}
|
||||
aria-label={t('Open document: {{title}}', {
|
||||
title: doc.title || t('Untitled document'),
|
||||
})}
|
||||
>
|
||||
<Box
|
||||
$flex={flexLeft}
|
||||
|
||||
@@ -372,7 +372,6 @@
|
||||
"Open the document options": "Öffnen Sie die Dokumentoptionen",
|
||||
"Open the header menu": "Öffne das Kopfzeilen-Menü",
|
||||
"Open document actions menu": "Dokumentaktionsmenü öffnen",
|
||||
"Open document: {{title}}": "Dokument öffnen: {{title}}",
|
||||
"Main content": "Hauptinhalt",
|
||||
"Home content": "Startseiten-Inhalt",
|
||||
"Documents grid": "Dokumentenraster",
|
||||
@@ -479,7 +478,6 @@
|
||||
"Cancel the deletion": "Cancel the deletion",
|
||||
"Cancel the download": "Cancel the download",
|
||||
"Open actions menu for document: {{title}}": "Open actions menu for document: {{title}}",
|
||||
"Open document: {{title}}": "Open document: {{title}}",
|
||||
"Open the menu of actions for the document: {{title}}": "Open the menu of actions for the document: {{title}}",
|
||||
"Share with {{count}} users_one": "Share with {{count}} user",
|
||||
"Shared with {{count}} users_many": "Shared with {{count}} users",
|
||||
@@ -609,7 +607,6 @@
|
||||
"Open the document options": "Abrir las opciones del documento",
|
||||
"Open the header menu": "Abrir el menú de encabezado",
|
||||
"Open document actions menu": "Abrir menú de acciones del documento",
|
||||
"Open document: {{title}}": "Abrir documento: {{title}}",
|
||||
"Main content": "Contenido principal",
|
||||
"Home content": "Contenido de inicio",
|
||||
"Documents grid": "Lista de documentos",
|
||||
@@ -842,7 +839,6 @@
|
||||
"Open the document options": "Ouvrir les options du document",
|
||||
"Open the header menu": "Ouvrir le menu d'en-tête",
|
||||
"Open document actions menu": "Ouvrir le menu d'actions du document",
|
||||
"Open document: {{title}}": "Ouvrir le document : {{title}}",
|
||||
"Open the menu of actions for the document: {{title}}": "Ouvrir le menu des actions du document : {{title}}",
|
||||
"Main content": "Contenu principal",
|
||||
"Home content": "Contenu d'accueil",
|
||||
@@ -1208,7 +1204,6 @@
|
||||
"Open the document options": "Open document opties",
|
||||
"Open the header menu": "Open het hoofdmenu",
|
||||
"Open document actions menu": "Open documentactiemenu",
|
||||
"Open document: {{title}}": "Document openen: {{title}}",
|
||||
"Main content": "Hoofdinhoud",
|
||||
"Home content": "Startpagina-inhoud",
|
||||
"Documents grid": "Documentenraster",
|
||||
|
||||
Reference in New Issue
Block a user